package com.qf.homework.mapper;

import com.qf.homework.entity.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper {
    @Select("select * from t_users where id=#{id}")
    User getUserId(Integer id);

    @Select("select * from t_users")
    List<User> selectUserAll();

    @Select("select count(*) from t_users where password=${pwd}")
    Integer selectCountPassword(String pwd);
    @Select("select * from t_users order by id ${order} ")
    List<User> selectUserWithOrder(@Param("order") String order);
@Select("select * from t_users limit #{start},#{size}")
    List<User> selectUserByPage(@Param("start") Integer start,@Param("size") Integer size);
}
